home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm1
/
frqmn101.lha
/
FRequestMan.spot
Wrap
Text File
|
1996-02-05
|
7KB
|
221 lines
/**************************************************************
* *
* FILEREQUESTMANAGER V 1.01 *
* *
* SPOT-ARexx Script © 1996 by Rainer Feest *
* *
* needs trapdoor.library *
* *
* BUG-reports, money, ... to: *
* E-Mail: rf@power.rt.schwaben.de *
* Fidonet : 2:246/2001.49 *
* *
* *
* Description: *
* ----------------------------------------------------- *
* This script helps you with your FIDO-filerequests. It *
* automatically calls up TRAPDOOR from SPOT and gets *
* your files. *
* *
* Files can be requested in three different ways: *
* a) three defined nodes *
* b) from the message-window *
* c) by manually entering the nodenumber *
* *
* ----------------------------------------------------- *
* Have fun with it and send me an EMail if you like it *
* *
**************************************************************/
/**************************************************************
* Changes from 0.7: *
* - an important bug with the request-file fixed *
* - uses the Nodelist to check if selected Node exists *
* - the Systemname of the selected Node is shown in the *
* windows *
* - uses a configuration-file *
* - has a user-friendly setup-program *
* - some minor bugs fixed *
**************************************************************/
ADDRESS SPOT
OPTIONS RESULTS
RET = ''
prm.1="Enter your OUTBOUND directory:"
def.1="OUTBOUND:"
comment.1="Your outbound directory"
prm.2="Enter your NODELIST directory:"
def.2="NODELIST:"
comment.2="The location of your nodelist"
prm.3="You can now enter 3 nodenumbers of "RET"nodes you often call to request files "RET" "RET"Enter your first NODE: "
def.3="1:234/567"
comment.3="1st Node"
prm.4="Enter your second NODE: "
def.4="1:234/567"
comment.4="2nd Node"
prm.5="Enter your third NODE: "
def.5="1:234/567"
comment.5="3rd Node"
if ~exists("Mail:frequestman.cfg") then do
do forever
count=1
do count= 1 to 5
if count < 3 then 'requestpath TITLE "'prm.count'" PATH "'def.count'"'
else 'requeststring TITLE "FRequestMan Configuration" PROMPT "'prm.count'" DEFAULT "'def.count'" CENTER'
if RC>0 then exit
output.count = result
end
count=1
text=""
do count = 1 to 5
text=text || comment.count || ": " || output.count || RET
end
'requestresponse TITLE "FRequestMan Configuration" PROMPT "'TEXT'" GADGETS "_Use Config|_Change|_Cancel"'
if rc = 0 then exit
if rc = 1 then do
call Open("CFG","Mail:frequestman.cfg",W)
count=1
do count = 1 to 5
call writeln("CFG", "'" || output.count || "' /* " || comment.count || " */")
end
call Close("CFG")
'requestnotify PROMPT "The configuration file is called MAIL:frequestman.cfg'RET'If you want to change something, edit this file or'RET'delete it and load the FileRequest Manager again."'
leave
end
end
end
call Open("CFG","Mail:frequestman.cfg",R)
output = readln("CFG")
parse var output "'" path "'"
output = readln("CFG")
parse var output "'" nodelist "'"
output = readln("CFG")
parse var output "'" alpha "'"
output = readln("CFG")
parse var output "'" betta "'"
output = readln("CFG")
parse var output "'" gamma "'"
call Close("CFG")
IF ~SHOW(Libraries,'traplist.library') THEN
IF ~ADDLIB("traplist.library",0,-30,0) THEN EXIT
'requestresponse TITLE "FileRequest Manger Version 1.01 © 1996 by Rainer Feest" PROMPT "Which nodenumber do you want to use?" GADGETS "'ALPHA'|'BETTA'|'GAMMA'|_Message|M_anually|_Cancel" CENTER'
if rc=0 then exit
if rc=1 then Node=AddinFIle(ALPHA)
if rc=2 then Node=AddinFIle(BETTA)
if rc=3 then Node=AddinFIle(GAMMA)
if rc=4 then do
'IsIconified'
If RC=0 Then 'UnIconify'
'IsAreaList'
If RC=0 Then Do
'RequestNotify PROMPT "Do not use from arealist"'
Exit
End
'getfromaddress'
Node=AddinFile(Result)
end
if rc=5 then do
'requeststring TITLE "Entering other node" PROMPT "Enter Address: (e.g 1:123/456.0)" CENTER'
input=Result
call NodeName(Input,Nodelist)
Node=AddinFile(Input)
end
text = ''
input = ""
c=1
call exists(""Path ||Node".REQ")
exist = result
if exist = 1 then do
call Open("OUT",""Path ||Node".REQ",R)
do while ~eof("OUT")
input.c = readln("OUT")
if input.c='' then leave
c=c+1
end
call Close("OUT")
end
Do forever
'RequestString TITLE "'NodeName(FileInAdd(Node),Nodelist)'" PROMPT "File to request:"'
IF RC = 5 then leave
input.c=result || RET
c=c+1
End
do count = 1 to c-1
if input.count ~= '' then text=text || input.count
end
'requestresponse TITLE "Files from 'NodeName(FileinAdd(Node),Nodelist)':" PROMPT "'TEXT'" GADGETS "_Get file(s)|_Delete|_Cancel" CENTER'
IF RC = 2 then do
address command
"delete >NIL: "Path ||NODE".REQ"
call Close("OUT")
exit
end
IF RC = 1 then do
if text="" then do
'requestnotify PROMPT "No files to request"'
exit
end
call Open("OUT",""Path ||NODE".REQ",W)
do count = 1 to c-1
Call writeln("OUT",input.count)
end
call Close("OUT")
address command 'trapdoor call' FileinAdd(Node) 'password ""'
end
exit
AddinFile: Procedure
parse arg ZON':'NET'/'NODE'.'
return ZON'.'NET'.'NODE'.'0
FileinAdd: Procedure
parse arg ZON'.'NET'.'NODE'.'
return ZON':'NET'/'NODE'.'0
NodeName: Procedure
parse arg Node,path
res = FindNode(Node,"All",path)
parse var res error" " "," ","sysname","
if error = 0 then do
'RequestNotify PROMPT "This node does not exist"'
exit
end
return sysname